function [ binaryMaxCoords ] = findBinaryOutline( binaryCoords )
% Finds the maximum of each column of binary values

yUniqueVals = unique(binaryCoords(:, 2));

binaryMaxCoords = zeros(length(yUniqueVals), 2);

for i = 1:length(yUniqueVals)

    valsTemp = binaryCoords(binaryCoords(:, 2) == yUniqueVals(i), :);
    
    binaryMaxCoords(yUniqueVals(i), 1) = yUniqueVals(i);
    
    binaryMaxCoords(yUniqueVals(i), 2) = max(valsTemp(:, 1));
    
end

% Replaces zero pixel indeces with proper pixel number
[ binaryMaxCoords ] = correctZeroIndeces( binaryMaxCoords );

end



